/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.isd.global.jobs;

import com.isd.global.excepciones.RollbackFailureException;
import javax.naming.InitialContext;
import com.isd.inventario.rn.ListaPrecioRN;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.NamingException;

/**
 *
 * @author Claudio
 */
public class LimpiarCatalogoJobs implements Runnable {

    @Override
    public void run() {

        try {
            InitialContext ic = new InitialContext();
            ListaPrecioRN listaPrecioRN = (ListaPrecioRN) ic.lookup("java:/tv/inventario/rn/ListaPrecioRN");
            listaPrecioRN.limpiarCatalogo();
            
        } catch (NamingException e) {
            Logger.getLogger(getClass().getName()).log(Level.SEVERE, "run", e);                       
        } catch (RollbackFailureException e) {
            Logger.getLogger(getClass().getName()).log(Level.SEVERE, "run", e);
        }
    }

}
